# 配置文件
import os

# API密钥配置
OPENAI_API_KEY = ""
DEEPSEEK_API_KEY = "sk-6b9a1c1845294019acc98577326b3e9a"

# Gemini API Key
GEMINI_API_KEY = ""

# 星河大模型 API 配置
XINGHE_API_KEY = "bce-v3/ALTAK-GC9TQ2g1jvMelu6uIKMMX/e07d1814829c9e121bb3091b803f860c824e9238"
XINGHE_BASE_URL = "https://qianfan.baidubce.com/v2"


# 模型配置
OPENAI_MODEL = "gpt-3.5-turbo"
DEEPSEEK_MODEL = "deepseek-chat"
XINGHE_MODEL = "ernie-4.5-turbo-vl"  # 星河大模型名称

# 应用配置
FLASK_SECRET_KEY = '4c04b4599e28ed1ce04231ae9694cf00c02a9d600bae80051631607a4c537626'
DEBUG_MODE = True

# 默认用户配置
DEFAULT_USERS = {
    'admin': {'password': '123456', 'role': 'admin', 'name': '管理员'},
    'student': {'password': '123456', 'role': 'student', 'name': '学生'},
    'teacher': {'password': '123456', 'role': 'teacher', 'name': '教师'}
}

# 知识库配置
KNOWLEDGE_BASE_PATH = 'rust_knowledge_base/rust_docs_sample.json'

# 问题分类标签
QUESTION_LABELS = ["greeting", "definition", "usage", "error_debug", "comparison", "faq"]

# 从环境变量读取API密钥（如果存在）
if os.getenv('OPENAI_API_KEY'):
    OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')

if os.getenv('DEEPSEEK_API_KEY'):
    DEEPSEEK_API_KEY = os.getenv('DEEPSEEK_API_KEY')

if os.getenv('GEMINI_API_KEY'):
    GEMINI_API_KEY = os.getenv('GEMINI_API_KEY')

if os.getenv('XINGHE_API_KEY'):
    XINGHE_API_KEY = os.getenv('XINGHE_API_KEY') 